package com.xinqi.common.green.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

/**
 * 阿里云 -- 内容安全检测 -- 标签 -- label
 * <p>
 * normal：正常文本
 * spam：含垃圾信息
 * ad：广告
 * politics：涉政
 * terrorism：暴恐
 * abuse：辱骂
 * porn：色情
 * flood：灌水
 * contraband：违禁
 * meaningless：无意义
 * harmful：不良场景（支持拜金炫富、追星应援、负面情绪、负面诱导等检测场景）
 * customized：自定义（例如命中自定义关键词）
 * <p>
 *
 * @Author：yyzhen
 * @Package：com.xinqi.common.base.utils.green
 * @Project：xinqiclass-cloud-plus
 * @name：GreenScanSuggestionEnum
 * @Date：2023/4/19 14:30
 * @Filename：GreenScanSuggestionEnum
 */
public enum GreenScanLabelEnum implements BaseEnum {

    NORMAL("normal", "正常文本"),

    SPAM("spam", "含垃圾信息"),

    AD("ad", "广告"),

    POLITICS("politics", "涉政"),

    TERRORISM("terrorism", "暴恐"),

    ABUSE("abuse", "辱骂"),

    PORN("porn", "色情"),

    FLOOD("flood", "灌水"),

    CONTRABAND("contraband", "违禁"),

    MEANINGLESS("meaningless", "不良场景（支持拜金炫富、追星应援、负面情绪、负面诱导等检测场景）"),

    HARMFUL("harmful", "无意义"),

    CUSTOMIZED("customized", "自定义（例如命中自定义关键词）");

    @Getter
    private final String code;

    @Getter
    private final String describe;

    GreenScanLabelEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static GreenScanLabelEnum of(String code) {
        return BaseEnum.of(GreenScanLabelEnum.class, code);
    }
}
